Apparatus and method for controlling switching power supply

ABSTRACT

An output voltage error detection unit outputs an auxiliary winding voltage generated across an auxiliary winding having the same number of turns as a secondary winding a certain period after a secondary conduction period starts. A correction amount calculation unit calculates a secondary voltage drop caused by a secondary current flowing in the conduction period based on a primary current flowing when the conduction period starts and outputs a calculation result as a correction amount. A reference voltage generation unit generates a reference voltage by adding the correction amount to the output voltage. A control unit generates a feedback signal to minimize the error between the auxiliary winding voltage obtained after a certain delay period and the reference voltage. A PWM signal generation unit controls a PWM signal based on the feedback signal, adjusts switching of the switching element, and maintains the output voltage at a constant level.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon, and claims the benefit of priority of,the prior Japanese Patent Application No. 2015-122171, filed on Jun. 17,2015, the entire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The embodiments discussed herein relate to an apparatus and a method forcontrolling a switching power supply.

2. Background of the Related Art

Many switching power supplies use a flyback topology for the alternatecurrent (AC)/direct current (DC) converter.

Such a flyback switching power supply includes a transformer and aswitching transistor such as a metal oxide semiconductor field effecttransistor (MOSFET), causes a diode bridge to rectify an AC inputvoltage, and obtains a desired DC output voltage from the rectifiedvoltage.

In addition, such an AC/DC converter is provided with a control circuitto supply a stable output voltage even when, for example, the AC inputvoltage, the load, or the temperature changes.

The control circuit is arranged on the primary side of the transformer.On the basis of information about the output voltage on the secondaryside of the transformer, the control circuit performs feedback controlon the switching of the MOSFET and maintains the output voltage at aconstant level.

For the transmission of this output voltage information from thesecondary side to the primary side, conventional flyback switching powersupplies use an insulating element such as an output voltage erroramplifier (a shunt regulator) or a photocoupler.

However, to reduce the cost, the number of parts, etc., power suppliesthat do not use such an output error amplifier or photocoupler haverecently been developed. These power supplies perform feedback controlon the output voltage by using a voltage that occurs across an auxiliarywinding of the transformer and are referred to as primary-side-controlflyback power supplies.

For example, according to a conventional technique for such aprimary-side-control flyback power supply, the output voltage iscontrolled by detecting the primary voltage and correcting the voltagelost from the secondary voltage when the secondary current reaches zero,for example (Japanese National Publication of International PatentApplication No. 2010-521954).

According to another conventional technique, a voltage that occursacross an auxiliary winding is detected and compared with a referencevalue, and a detection period is determined based on the comparisonresult. In addition, the detected voltage is sampled by using two pulseswithin the detection period, and one of the detected voltages isoutputted (Japanese Laid-open Patent Publication No. 2013-121214).

A flyback power supply performs a control operation so that the outputvoltage has a desired value. A primary-side-control flyback power supplyalso includes a transformer having an auxiliary winding. Ideally, theprimary-side-control flyback power supply obtains a voltage thatcorresponds to the output voltage from the auxiliary winding andcontrols the output voltage on the basis of the obtained voltage. Morespecifically, for example, the secondary winding and the auxiliarywinding of the transformer are formed to have the same number of turns.A voltage that corresponds to the output voltage is generated across theauxiliary winding, and the voltage that occurs across the auxiliarywinding in a secondary conduction period is detected. In addition, theoutput voltage is controlled by using a pulse width modulation (PWM)control circuit.

However, in reality, since a voltage drop is caused by a diode and thelike arranged on the secondary side, the output voltage is changed fromits target value, and an error is caused.

Thus, a control circuit for a simple primary-side-control flyback powersupply does not perform the above error correction and is used when ahigh degree of accuracy is not needed. Meanwhile, means for correctingthis error has also been proposed. For example, Japanese NationalPublication of International Patent Application No. 2010-521954discusses sampling an auxiliary winding voltage a plurality of times ina secondary conduction period and performing a control operation byusing a sampling result obtained immediately before the secondarycurrent reaches zero and the auxiliary winding voltage begins todecrease. As another example, as discussed in U.S. Patent ApplicationPublication No. 2010/0246216, there is known a technique in which theslope of an auxiliary winding voltage over time is monitored. Accordingto this technique, a control operation is performed by using theauxiliary winding voltage when the secondary voltage reaches zero andthe slope of the auxiliary winding voltage significantly changes.According to any of these techniques, the secondary current isdetermined to have reached zero by detecting when the auxiliary voltagebegins to sharply decrease, and a control operation is performed byusing an auxiliary winding voltage immediately before this timing.

In an operation in a discontinuous current mode (DCM) in which thesecondary current reaches zero per switching period, these conventionaltechniques achieve accurate output control while eliminating the voltagelost on the secondary side. However, when the input voltage is low orthe load current is large, an operation in a continuous current mode(CCM) could occur. In such a case, the secondary current has not reachedzero when the auxiliary winding voltage begins to sharply decrease.Thus, according to the above conventional techniques, the error causedby the loss on the secondary side cannot completely be eliminated.

SUMMARY OF THE INVENTION

According to one aspect, there is provided an apparatus for controllinga switching power supply that causes a transformer to convert an inputvoltage on a primary side into a direct-current output voltage on asecondary side based on switching of a switching element and supply theoutput voltage to load, the apparatus including: an output voltage errordetection unit configured to output an auxiliary winding voltagegenerated across an auxiliary winding having the same number of turns asa secondary winding of the transformer a certain period after asecondary conduction period of the transformer starts; a correctionamount calculation unit configured to calculate a secondary voltage dropcaused by a secondary current flowing in the secondary conduction periodbased on a primary current flowing through the switching elementarranged on the primary side when the secondary conduction period startsand output a result of the calculation as a correction amount to beadded to a target value for the output voltage; a reference voltagegeneration unit configured to generate a reference voltage by adding avoltage corresponding to the correction amount to a target voltage forthe output voltage; a control unit configured to perform feedbackcontrol to minimize an error between the auxiliary winding voltageobtained after a certain delay period and the reference voltage andgenerate a feedback signal; and a pulse width modulation (PWM) controlunit configured to control a PWM signal based on the feedback signal,adjust switching of the switching element, and perform a controloperation to maintain the output voltage at a constant level.

The object and advantages of the invention will be realized and attainedby means of the elements and combinations particularly pointed out inthe claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the invention.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 illustrates an example of a configuration of a switching powersupply;

FIG. 2 illustrates an example of a configuration of aprimary-side-control flyback power supply;

FIG. 3 illustrates waveforms of an ideal operation of theprimary-side-control flyback power supply;

FIG. 4 illustrates waveforms of an actual operation of theprimary-side-control flyback power supply;

FIG. 5 illustrates waveforms of another actual operation of theprimary-side-control flyback power supply;

FIG. 6 illustrates an example of a configuration of a control device ofa switching power supply;

FIG. 7 illustrates an example of a configuration of a flyback switchingpower supply;

FIG. 8 illustrates an example of a configuration of a control device ofthe switching power supply;

FIG. 9 illustrates an example of a configuration of a control device ofthe switching power supply;

FIG. 10 is a timing diagram illustrating operation waveforms;

FIGS. 11 and 12 illustrate an example of a configuration of a controldevice of the switching power supply; and

FIG. 13 illustrates an example of a configuration of a control device ofthe switching power supply.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments will be described below with reference to the accompanyingdrawings, wherein like reference characters refer to like elementsthroughout. FIG. 1 illustrates an example of a configuration of aswitching power supply 1. The switching power supply 1 includes atransformer 10, a bridge circuit 11, a switching element 12, an inputcapacitor C1, a diode Ds, an output capacitor C2, a resistor Rd, and acontrol device 2.

The bridge circuit 11 rectifies an AC voltage outputted from an ACvoltage source al. The input capacitor C1 smoothes and converts therectified voltage into a DC voltage.

The transformer 10 includes a primary winding L1, a secondary windingL2, and an auxiliary winding Laux and transmits the energy generated onthe primary side to the secondary side. The diode Ds rectifies thevoltage generated by the secondary winding L2.

The output capacitor C2 smoothes the rectified voltage. The smoothedvoltage is applied to a load 5 connected to output terminals of theswitching power supply 1. The resistor Rd is for discharging an electriccurrent so that the output voltage is not excessively increased under ano-load condition. The resistor Rd is what is called a bleeder resistor.

The auxiliary winding Laux is a winding wound in the same way as thesecondary winding L2, and an auxiliary winding voltage Vaux generatedacross the auxiliary winding Laux is transmitted to the control device2. A signal Cs is a voltage corresponding to the primary current flowingthrough the switching element 12 and is also transmitted to the controldevice 2.

The control device 2 includes an output voltage error detection unit 2a, a correction amount calculation unit 2 b, a reference voltagegeneration unit 2 c, a control unit 2 d, and a PWM signal generationunit 2 e.

The output voltage error detection unit 2 a samples, holds, and outputsthe auxiliary winding voltage Vaux generated across the auxiliarywinding Laux having the same number of turns as the secondary winding L2of the transformer 10 a certain period after the secondary conductionperiod of the transformer 10 starts.

The correction amount calculation unit 2 b calculates a voltagecorresponding to a voltage drop from a secondary voltage V2 to a voltageacross the output voltage terminals T1 and T2, the secondary voltage V2generated by a secondary current Is flowing in a secondary conductionperiod, based on a primary current Ip flowing through the switchingelement 12 arranged on the primary side when the secondary conductionperiod starts and outputs a result of the calculation as a correctionamount added to a target value for the output voltage.

The reference voltage generation unit 2 c generates a reference voltageVref obtained by adding a voltage corresponding to the correction amountto the target voltage value for the output voltage at terminals T1 andT2. The control unit 2 d generates a feedback signal (a voltage) tominimize the error between the auxiliary winding voltage outputted aftera certain delay period from the output voltage error detection unit 2 aand the reference voltage Vref. The PWM signal generation unit 2 egenerates a PWM signal based on the feedback voltage, adjusts switchingof the switching element 12, and maintains the output voltage at aconstant level.

Before the present embodiment is described in detail, a configuration ofand a problem with a general primary-side-control flyback power supplywill be described.

FIG. 2 illustrates an example of a configuration of aprimary-side-control flyback power supply 1 a. The primary-side-controlflyback power supply 1 a includes a bridge circuit 11, capacitors C1 toC3, resistors R1 to R5 and Rd, diodes D1 and Ds, a transformer 10, aswitching element M1, and a control integrated circuit (IC) 200 a. Whilethe power supply of the control IC is not illustrated, the control IC isused by supplying a power supply from a high-potential-side outputterminal of a bridge diode, an output terminal to which the rectifiedauxiliary winding voltage is applied, an external power supply device,or the like.

An NMOS transistor is used as the switching element M1 (alternatively,an insulated gate bipolar transistor (IGBT) or a bipolar transistor maybe used).

The transformer 10 includes a primary winding L1, a secondary windingL2, and an auxiliary winding Laux.

Next, the connection of these elements in the circuit will be described.Two input terminals of the bridge circuit 11 are connected to AC voltageinput terminals 100 a. The positive output terminal of the bridgecircuit 11 is connected to the positive terminal of the capacitor C1,one end of the resistor R2, one end of the capacitor C3, and one end ofthe primary winding L1 of the transformer 10.

The negative output terminal of the bridge circuit 11 is connected tothe negative terminal of the capacitor C1 and ground (GND). The otherend of the resistor R2 is connected to the other end of the capacitor C3and one end of the resistor R1.

The other end of the resistor R1 is connected to the cathode of thediode D1, and the anode of the diode D1 is connected to the other end ofthe primary winding L1 and the drain of the switching element M1. Thesnubber circuit formed by the resistors R1 and R2, the capacitor C3, andthe diode D1 is not limited to the above configuration.

One end of the auxiliary winding Laux of the transformer 10 is connectedto one end of the resistor R3, and the other end of the auxiliarywinding Laux is connected to GND. The control IC 200 a has a terminal Vsconnected to the other end of the resistor R3 and one end of theresistor R4, and the other end of the resistor R4 is connected to GND.

The control IC 200 a has a terminal Cs connected the source of theswitching element M1 and one end of the resistor R5, and the other endof the resistor R5 is connected to GND. The control IC 200 a has aterminal Vpwm connected to the gate of the switching element M1 and hasa GND terminal connected to GND.

One end of the secondary winding L2 of the transformer 10 is connectedto the anode of the diode Ds, and the cathode of the diode Ds isconnected to one end of the capacitor C2, one end of the resistor Rd,and one of DC voltage output terminals 100 b.

The other end of the secondary winding L2 is connected to the other endof the capacitor C2, the other end of the resistor Rd, the other one ofthe DC voltage output terminals 100 b, and GND. The two DC voltageoutput terminals 100 b are connected to a load 5 connected to ground.

The bridge circuit 11 rectifies an AC voltage inputted from the ACvoltage input terminals 100 a. The capacitor C1 smoothes the rectifiedvoltage to convert the AC voltage into a DC voltage. As a result, avoltage V1 is generated across the primary winding L1.

The diode Ds arranged on the secondary side rectifies a voltage V2generated across the secondary winding L2. The capacitor C2 smoothes therectified voltage, and the smoothed voltage is applied to the load 5.The resistor Rd is for discharging an electric current so that theoutput voltage is not excessively increased under a no-load condition.The resistor Rd is what is called a bleeder resistor.

The voltage V1 generated across the primary winding L1 and the voltageV2 generated across the secondary winding L2 have opposite polarities.However, a voltage Vaux generated across the auxiliary winding Laux andthe voltage V2 generated across the secondary winding L2 have the samepolarity.

Next, an operation will be described. The primary-side-control flybackpower supply 1 a includes the auxiliary winding Laux wound in the samedirection as the secondary winding L2 and connected to GND on theprimary side. The voltage (or a part of the voltage) across theauxiliary winding Laux is applied to the output voltage detectionterminal Vs of the control IC 200 a.

The control IC 200 a includes a function of generating a referencevoltage used as a setting value for the output voltage and detects adifferential signal between the reference voltage and the voltageinputted to the output voltage detection terminal Vs through theauxiliary winding Laux.

Next, the control IC 200 a generates a PWM signal by using thedifferential signal and current information inputted to the currentdetection terminal Cs and outputs the PWM signal from the terminal Vpwm.

The PWM signal is inputted to the gate of the switching element M1 as agate signal. The switching element M1 is brought in an on- or off-stateon the basis of the PWM signal. In accordance with this operation, PWMcontrol for stabilizing the output voltage at a target value isperformed.

FIG. 3 illustrates waveforms of an ideal operation of theprimary-side-control flyback power supply. In FIG. 3, “Tsw” represents aswitching period of on and off of the switching element M1.

When the gate signal Vg of the switching element M1 reaches a highpotential level (H level), the switching element M1 is brought in anon-state, and a primary current Ip as illustrated in FIG. 2 begins toflow.

Since the primary winding L1 includes an inductance component, theprimary current Ip constantly increases with time as long as theswitching element M1 remains in an on-state. In contrast, since thesecondary winding L2 is wound in the direction opposite to the primarywinding L1, a secondary current Is does not flow through the secondarywinding L2 as long as the switching element M1 remains in an on-state.

After a period Ton elapses, when the gate signal Vg reaches a lowpotential level (L level), the switching element M1 is brought in anoff-state. As a result, the primary current Ip stops flowing. Next, theenergy accumulated in the transformer 10 is transmitted to the secondaryside, and thus, the secondary side is brought in a conduction state.Namely, the secondary current Is begins to flow. The secondary currentIs decreases with time.

Assuming that no voltage drop is caused by the secondary-side diode Dsin a secondary conduction period Td, the secondary voltage V2 generatedacross the secondary winding L2 is equal to the output voltage Vout.Namely, the secondary voltage V2 appears as a flat waveform asillustrated in FIG. 3 (on the condition that the output capacitor C2 hasa sufficiently large capacitance).

Meanwhile, the voltage Vaux is generated across the auxiliary windingLaux. The voltage Vaux is proportional to the turn ratio between theauxiliary winding Laux and the secondary winding L2. The voltage Vaux(t)across the auxiliary winding Laux at time t may be calculated by thefollowing expression (1).

Vaux(t)=(Naux/N2)×V2(t)  (1)

In expression (1), N2 represents the number of turns of the secondarywinding L2, Naux represents the number of turns of the auxiliary windingLaux, and V2(t) represents the voltage across the secondary winding L2.

In expression (1), the number N2 of turns of the secondary winding L2and the number Naux of turns of the auxiliary winding Laux are set to bethe same (N2=Naux), the voltage that corresponds to the output voltageVout also appears across the auxiliary winding Laux in the secondaryconduction period Td (Vaux=V2).

Thus, by detecting the auxiliary winding voltage Vaux in the secondaryconduction period Td, the control IC 200 a is able to obtain informationabout the output voltage generated across the secondary side and performPWM control based on the obtained output voltage information.

Next, a problem with the primary-side-control flyback power supply 1 awill be described. In reality, a voltage drop is caused on the secondaryside because of the circuit configuration on the secondary side. Thus,regarding the relationship between the secondary voltage V2 and theoutput voltage, parameters relating to this voltage drop need to beconsidered.

If the parameters relating to the voltage drop on the secondary side aretaken into consideration, the relationship between the secondary voltageV2 and the output voltage Vout is represented by expression (2).

V2(t)=Vout(t)+VF0+r×Is(t)  (2)

In expression (2), VF0 represents a voltage drop at the diode Ds whenIs=0 A. In addition, Is(t) represents a secondary current that flows inthe direction as illustrated in FIG. 2, and r represents an equivalentresistance component including the resistance of the diode Ds and theoutput voltage path on the secondary side.

Assuming that a target output value Vout_(set) set for the outputvoltage is used in place of the secondary voltage V2(t), expression (2)may be written as expression (3).

Vout(t)=Vout_(set) −VF0−r×Is(t)  (3)

In expression (3), the sum of VF0 in the second term and r×Is(t) in thethird term represents the error voltage (the voltage drop on thesecondary side). It is seen that the output voltage Vout is obtained bysubtracting this error voltage from the target output value Vout_(set).

Thus, for the control IC 200 a to accurately recognize the outputvoltage Vout, it is important that the auxiliary winding voltage Vauxinputted to the output voltage detection terminal Vs be corrected inview of the error caused by VF0 in the second term and r×Is(t) in thethird term.

Since the error caused by VF0 in the second term is the voltage drop atthe diode Ds when Is=0 A, the error may be handled as a fixed value.However, as to the error caused by r×Is(t) in the third term, Is(t)changes, for example, depending on the load current when theprimary-side-control flyback power supply 1 a is in operation. Thus, thethird term represents a variable voltage drop, and dynamic correction isneeded therefor.

To eliminate the error voltage represented by the third term, measureshave conventionally been proposed. For example, the primary-side-controlflyback power supply may control the output voltage by using theauxiliary winding voltage Vaux applied when the secondary current Isreaches zero (for example, the above Japanese National Publication ofInternational Patent Application No. 2010-521954).

According to this method, the primary-side-control flyback power supply1 a determines that the secondary current Is has reached zero bydetecting timing immediately before the auxiliary winding voltage Vauxsharply decreases. In addition, the primary-side-control flyback powersupply 1 a controls the output voltage by using the auxiliary windingvoltage Vaux applied when the secondary current Is reaches zero.

FIG. 4 illustrates waveforms of an actual operation of theprimary-side-control flyback power supply 1 a. More specifically, FIG. 4illustrates operation waveforms in the DCM in which the secondarycurrent Is reaches zero in the switching period Tsw.

The control IC 200 a detects the auxiliary winding voltage Vaux appliedimmediately before the secondary current Is reaches 0 A, namely,immediately before the secondary conduction period Td ends, and receivesthe detected auxiliary winding voltage Vaux via the output voltagedetection terminal Vs.

Since Is=OA at timing t1, the auxiliary winding voltage Vaux isrepresented by Vout(t1)+VF0 (see the above expression (2)). Thus, theerror to be corrected is only the voltage drop VF0. As described above,the voltage drop VF0 is a fixed value and can easily be corrected.

In this way, the primary-side-control flyback power supply 1 a is ableto eliminate the error caused by the voltage drop on the secondary sideby using the auxiliary winding voltage Vaux applied when the secondarycurrent Is reaches zero. However, while this method is effective in theDCM, the voltage drop on the secondary side cannot completely beeliminated when the primary-side-control flyback power supply isoperated in the CCM.

FIG. 5 illustrates waveforms of another actual operation of theprimary-side-control flyback power supply. More specifically, FIG. 5illustrates operation waveforms in the CCM in which the secondarycurrent Is does not reach zero in the switching period Tsw.

In the CCM, while the secondary current Is is flowing (before thesecondary current Is reaches zero), the primary side turns on and theprimary current Ip flows.

In the secondary conduction period Td, more specifically, at timing t1at which the secondary period Td ends, the control IC 200 a detects theauxiliary winding voltage Vaux inputted to the output voltage detectionterminal Vs.

In the CCM, the secondary current Is has not reached 0 A at timing t1.Since Is is not 0 A, Vaux(t1) is represented by Vout(t1)+VF0+r×Is (t1)as represented by expression (2). Namely, the error voltage in the thirdterm is included.

While there is a switching power supply that operates only in the DCMthroughout its operation range, there is also a switching power supplythat operates in the CCM when the load current is large.

Thus, in the case of the latter switching power supply, even if theswitching power supply controls the output voltage by detecting thetiming at which the auxiliary winding voltage Vaux has reached thelowest level in the secondary conduction period Td, since the secondarycurrent Is does not reach zero in the CCM, the error caused by thevoltage drop on the secondary side cannot be eliminated.

The present technique has been made in view of such circumstances andprovides a device and a method for controlling a switching power supply.The device and the method achieve an accurate output voltage, whetherthe switching power supply is operated in the DCM or CCM.

Next, a configuration and an operating principle of a control device, towhich the present technique is directed, of a switching power supplywill be described. FIG. 6 illustrates an example of a configuration of acontrol device 20 of a switching power supply. The control device 20 ofthe switching power supply includes a PWM control unit 210, a correctioncontrol unit 220, a reference voltage generation unit 230, and a driverDr.

The PWM control unit 210 includes a delay unit 211, an output voltageerror detection unit 212, a control unit 213, and a PWM generation unit214. The correction control unit 220 includes a primary currentdetection unit 221 and a correction amount calculation unit 222. Thereference voltage generation unit 230 includes an operator 231.

The PWM control unit 210 realizes the functions of the output voltageerror detection unit 2 a, the control unit 2 d, and the PWM signalgeneration unit 2 e illustrated in FIG. 1. The correction control unit220 realizes the functions of the correction amount calculation unit 2 billustrated in FIG. 1. The reference voltage generation unit 230realizes the functions of the reference voltage generation unit 2 cillustrated in FIG. 1.

The control device 20 controls the output voltage by using the auxiliarywinding voltage Vaux detected a certain period Tsh after a secondaryconduction period starts.

When a secondary conduction period starts (when a primary conductionperiod ends) corresponds to when a PWM signal Vpwm0 outputted from thePWM generation unit 214 reaches an L level.

Thus, the delay unit 211 delays the PWM signal Vpwm0 outputted from thePWM generation unit 214 by the certain period Tsh and outputs thedelayed PWM signal Vpwm0, and the output voltage error detection unit212 latches the auxiliary winding voltage Vaux inputted via the outputvoltage detection terminal Vs with the output signal from the delay unit211. In this way, the control device 20 detects the auxiliary windingvoltage Vaux the certain period Tsh after the secondary conductionperiod starts.

To obtain suitable output voltage accuracy, the control device 20corrects the secondary voltage drop (r×Is(Tsh)) corresponding to thesecondary current Is. Hereinafter, the correction control on thesecondary voltage drop will be described in detail.

First, the primary current detection unit 221 recognizes a primarycurrent Ip_(pk) (the peak value of the primary current) that flows whenthe PWM signal Vpwm0 reaches the L level. From the primary currentIp_(pk), the secondary current Is_(pk) (the peak value of the secondarycurrent) that flows when the secondary conduction period starts iscalculated by the following expression (4).

Is _(pk)=(N1/N2)×Ip _(pk)  (4)

The inductance Ls of the secondary winding L2 of the transformer 10 iscalculated by the following expression (5) including the inductance Lpof the primary winding L1 of the transformer 10 and the turn ratio(N2/N1).

Ls=(N2/N1)² ×Lp  (5)

In addition, the secondary current Is(Tsh) the period Tsh after thesecondary conduction period starts is calculated by the followingexpression (6).

Is(Tsh)=Is _(pk)−(Vout/Ls)×Tsh  (6)

By substituting expressions (4) to (6) in expression (3), the outputvoltage Vout(Tsh) at Tsh may be expressed as expression (7).

$\begin{matrix}{{{Vout}({Tsh})} = {{Vout}_{set} - \left\{ {\left( {{{VF}\; 0} - {r \times \frac{Vout}{Ls} \times {Tsh}}} \right) + {r \times \frac{N\; 1}{N\; 2} \times {Ip}_{pk}}} \right\}}} & (7)\end{matrix}$

The second term in expression (7) corresponds to the total voltage dropon the secondary side. If the second term is expressed as Vout_(corr),expression (8) is obtained.

$\begin{matrix}{{Vout}_{corr} = {\left( {{{VF}\; 0} - {r \times \frac{Vout}{Ls} \times {Tsh}}} \right) + {r \times \frac{N\; 1}{N\; 2} \times {Ip}_{pk}}}} & (8)\end{matrix}$

By adding the voltage drop correction amount Vout_(corr) in expression(8) to the target output voltage value Vout_(set) in expression (7), theoutput voltage value is allowed to be corrected to the target outputvalue.

In expression (8), only the primary current Ip_(pk) is a parameter thatchanges while the device is in operation. Thus, the primary currentdetection unit 221 detects the primary current Ip_(pk), and thecorrection amount calculation unit 222 performs the calculationcorresponding to expression (8) and determines a correction amount.

In addition, the reference voltage generation unit 230 includes theoperator 231, which adds the correction amount Vout_(corr) determined bythe correction amount calculation unit 222, to the target output valueVout_(set) and outputs the addition result as a reference voltage Vref.The target output value Vout_(set) may previously be set as a uniquevalue in the device or as a value set from the outside.

The output voltage error detection unit 212 compares the referencevoltage Vref with the output voltage value at time Tsh (the value of thedetected auxiliary winding voltage) and outputs the error voltage.Configured as described above, the switching power supply is able toobtain an accurate output voltage without being affected by the voltagedrop on the secondary side, whether the switching power supply isoperated in the DCM or CCM.

Next, a specific circuit configuration and operation of the controldevice 20 of a switching power supply will be described. First, anoverall configuration of a flyback switching power supply 1-1 includingthe control device 20 will be described.

FIG. 7 illustrates an example of a configuration of the flybackswitching power supply 1-1. The flyback switching power supply 1-1includes a bridge circuit 11, capacitors C1 to C3, resistors R1 to R5and Rd, diodes D1 and Ds, a transformer 10, a switching element M1, anda control device 20. The flyback switching power supply 1-1 has the sameconfiguration as that of the primary-side-control flyback power supply 1a, except that the control IC 200 a illustrated in FIG. 2 has beenreplaced by the control device 20.

The control device 20 is arranged on the primary side of the flybackpower supply. The control device 20 includes an output voltage detectionterminal Vs for detecting a voltage obtained by dividing an auxiliarywinding voltage Vaux, a current detection terminal Cs for detecting aprimary current, and a gate output terminal Vpwm for outputting a PWMsignal as a gate signal. Since the constituent elements other than thecontrol device 20 have already been described with reference to FIG. 2,redundant description thereof will be omitted.

FIG. 8 illustrates an example of a configuration of a control device20-1 of the switching power supply. The control device 20-1 includes asample and hold (S/H) signal generation unit 21, an output voltage errordetection unit 22, a control unit 23, a PWM generation unit 24, acorrection control unit 25, a reference voltage generation unit 26, anda driver Dr.

The output voltage error detection unit 22 includes a S/H circuit 22 aand an analog-to-digital converter (ADC) 22 b. The control unit 23includes a digital controller 23 a, a current control digital-to-analogconverter (DAC) 23 b, and a frequency control DAC 23 c.

The PWM generation unit 24 includes a comparator 24 a, a voltagecontrolled oscillator (VCO) 24 b, and an RS flip flop 24 c. Thecorrection control unit 25 includes a primary current detection unit 25a and a correction amount calculation unit 25 b. The reference voltagegeneration unit 26 includes an operator 26 a and a reference voltage DAC26 b.

The S/H signal generation unit 21 corresponds to the delay unit 211 inFIG. 6, and the output voltage error detection unit 22 corresponds tothe output voltage error detection unit 212 in FIG. 6.

The control unit 23 corresponds to the control unit 213 in FIG. 6, andthe PWM generation unit 24 corresponds to the PWM generation unit 214 inFIG. 6. The correction control unit 25 corresponds to the correctioncontrol unit 220 in FIG. 6 and the reference voltage generation unit 26corresponds to the reference voltage generation unit 230 in FIG. 6.

In FIG. 8, the S/H circuit 22 a detects a voltage inputted via theoutput voltage detection terminal Vs per switching period of theswitching element M1. The S/H circuit 22 a performs sampling time Tshafter the PWM signal Vpwm0 changes from the H level to the L level (whenthe secondary conduction period starts). The S/H circuit 22 a holds thesampling value until the digital controller 23 a located downstreamthereof completes its calculation.

The ADC 22 b outputs a digital signal based on an output signal Vsh fromthe S/H circuit 22 a. For example, the ADC 22 b is a window ADC andoutputs the error between the output signal Vsh from the S/H circuit 22a and a reference voltage Vref as a digital value. The reference voltageVref is a target voltage outputted from the S/H circuit 22 a and isoutputted from the reference voltage DAC 26 b, which will be describedin detail below.

The digital controller 23 a receives the output signal ADC[m:0] from theADC 22 b and a clock ckpi. The expression “[m:0]” represents that theleast significant bit and most significant bit (LSB and MSB) are 0 and mbits, respectively. Namely, the output signal ADC[m:0] is a (m+1)-bitsignal from the 0th to m-th bits in total.

The digital controller 23 a performs a control operation for setting thesignal ADC[m:0] outputted from the ADC 22 b to zero. More specifically,the digital controller 23 a performs a control operation for setting theerror between the output signal Vsh from the S/H circuit 22 a and thereference voltage Vref to be 1 LSB or less, for example. An expressionbased on proportional integral (PI) control, an expression based onproportional integral derivative (PID) control, or the like may be usedas an expression for the control operation.

An output signal DnIp[n:0] from the digital controller 23 a is inputtedto the current control DAC 23 b, the frequency control DAC 23 c, and theprimary current detection unit 25 a. The current control DAC 23 bconverts the digital signal DnIp[n:0] into an analog signal Vcsth.

The comparator 24 a compares the signal Vcsth outputted from the currentcontrol DAC 23 b with a voltage Vcs inputted via the current detectionterminal Cs.

The input voltage Vcs is inputted to the positive input terminal of thecomparator 24 a, and the signal Vcsth is inputted to the negative inputterminal of the comparator 24 a. Thus, when the level of the inputvoltage Vcs is lower than that of the signal Vcsth, the comparator 24 aoutputs an L level. In contrast, when the level of the input voltage Vcsis equal to or more than the signal Vcsth, the comparator 24 a outputsan H level.

The output from the comparator 24 a is inputted to the reset terminal(R) of the RS flip flop 24 c that is arranged downstream of thecomparator 24 a and that generates a PWM signal. The output from thecomparator 24 a determines the period for which the PWM signal isoutputted at the H level.

The frequency control DAC 23 c converts the output signal DnIp[n:0] fromthe digital controller 23 a into an analog signal and outputs a voltagesignal for controlling the oscillation frequency of the VCO 24 b. TheVCO 24 b generates a pulse signal having a switching frequency based onthe voltage signal outputted from the frequency control DAC 23 c andoutputs the pulse signal to the set terminal (S) of the RS flip flop 24c.

The switching frequency may be changed depending on the load condition.In the case of the configuration illustrated in FIG. 8, the frequencycontrol DAC 23 c and the VCO 24 b change the switching frequency,depending on the internal control amount (the output value of thedigital controller 23 a).

Next, the correction control unit 25 and the reference voltagegeneration unit 26 will be described. The primary current detection unit25 a acquires the value of the output signal DnIp[n:0] from the digitalcontroller 23 a when the PWM signal changes from the H level to the Llevel (when the primary switching element M1 is brought in anoff-state).

The output signal DnIp[n:0] from the digital controller 23 a at thistiming corresponds to the primary current value Ip_(pk) flowing when theprimary switching element M1 is brought in an off-state, as can be seenby the configuration in which the digital controller 23 a is connectedto the comparator 24 a via the current control DAC 23 b.

In addition, as described above, the S/H circuit 22 a detects the signalinputted via the output voltage detection terminal Vs. Since thedetection is fixedly performed the time Tsh after the falling edge of aPWM signal, the detection timing is known. Thus, as indicated byexpressions (4) to (8), by obtaining the information about the primarycurrent value Ip_(pk), the correction amount calculation unit 25 b isable to calculate a digital value corresponding to the correction amountVout_(corr) per switching period.

The digital-value correction amount Dn_(corr) that is outputted from thecorrection amount calculation unit 25 b and that corresponds to thecorrection amount Vout_(corr) is represented by the following digitaloperation expression (9)

$\begin{matrix}{{Dn}_{corr} = {{Rdiv} \times \frac{Naux}{N\; 2} \times \left\{ {\left( {{{VF}\; 0} - {r \times \frac{Vout}{Ls} \times {Tsh}}} \right) + {r \times \frac{N\; 1}{N\; 2} \times {Kdac}\; 1 \times {DnIp}}} \right\}}} & (9)\end{matrix}$

In expression (9), “Rdiv” represents the resistance ratio of thedividing resistors connected to both ends of the auxiliary winding, and“N1,” “N2,” and “Naux” represent the numbers of turns of the primary,secondary, and auxiliary windings, respectively. “Ls” represents theinductance value of the secondary winding, “VF0” represents the voltagedrop of the secondary diode Ds when no current is flowing. In addition,“r” represents the resistance component of the diode Ds and thesecondary output voltage path, and “Vout” represents the output voltagevalue. “Tsh” represents a digital value that corresponds to the setdelay time between when the secondary conduction period starts and whenthe S/H circuit 22 a begins sampling. “Kdac1” represents the conversiongain of the current control DAC 23 b, and “DnIp” represents the outputvalue of the digital controller 23 a.

The operator 26 a adds a digital reference value Dnref0 that correspondsto the target voltage value Vout_(set) and the correction amountDn_(corr) [p:0] and outputs the operation result Dnref. The referencevoltage DAC 26 b converts the operation result Dnref outputted from theoperator 26 a from the digital value to an analog signal, generates areference voltage Vref as a target value for the voltage inputted viathe output voltage detection terminal Vs, and transmits the referencevoltage Vref to the ADC 22 b.

As described above, the control device 20-1 of the switching powersupply calculates a correction amount that corresponds to the secondaryvoltage drop per switching period and changes the reference voltage thatdetermines a target value for the output voltage value.

In this way, even when the load is changed and the secondary voltagedrop is changed, the error voltage caused by the secondary voltage dropis accurately corrected, whether the switching power supply is operatedin the DCM or CCM. Namely, suitable load regulation characteristics (thepercentage change in output voltage when the load current changes) areobtained.

Next, a slope compensation function will be described. In a current modein which the peak current is controlled by feeding back the inductorcurrent of the transformer 10 and performing constant voltage control asillustrated in FIG. 8, when the duty ratio ((the H level period of apulse/period)×100%) is 50% or more, subharmonic oscillation could occur.Thus, it is preferable that a slope compensation function be included.

Thus, the control device 20-1 illustrated in FIG. 8 may include a slopecompensation function. For example, the control device 20-1 may performslope compensation by superimposing a ramp voltage and a voltageinputted via the current detection terminal Cs and inputting a result ofthe superimposition to the positive input terminal of the comparator 24a.

However, the control device 20-1 illustrated in FIG. 8 estimates thesecondary current while determining the digital control amount DnIpobtained when the primary switching element M1 is brought in anoff-state to correspond to the primary current Ip_(pk) and corrects thesecondary voltage drop.

Thus, if the control device 20-1 includes only the above slopecompensation function, a ramp voltage is superimposed on the detectedprimary current. Namely, if the correction expression of expression (9)including the digital control amount DnIp is used, the correction amountis excessively increased by the ramp voltage, and as a result, thecalculated error excessively increases the output voltage.

Thus, to suppress this error, for example, a digital signal thatcorresponds to the ramp voltage is added to the output from the digitalcontroller 23 a, and the digital output DnIpslope to which the rampsignal has been added may be inputted to each of the primary currentdetection unit 25 a and the current control DAC 23 b. In this way, theerror caused by the above ramp voltage is avoided.

Next, a control device that performs slope compensation and that isincluded in a switching power supply will be described. FIG. 9illustrates an example of a configuration of a control device 20-2 ofthe switching power supply, and FIG. 10 is a timing diagram illustratingoperation waveforms.

In addition to the circuit elements illustrated in FIG. 8, the controldevice 20-2 includes, as additional circuit elements, a slopecompensator 31, operators 32 and 33, and a slope compensation simulationcircuit 3. The other elements are the same as those illustrated in FIG.8.

Among the operation waveforms illustrated in FIG. 10, “Vramp” representsthe output from the slope compensator 31. “Vcs” represents the voltageinputted via the current detection terminal Cs. “Vcsslope” representsthe sum of the value Vramp and the value Vcs.

“Vpwm0” represents the signal inputted to the driver Dr. “Dnslope”represents the signal outputted from the slope compensation simulationcircuit 3. In addition, “ckpi” represents the clock signal inputted tothe digital controller 23 a.

“DnIpslope” represents a value obtained by subtracting the value Dnslopefrom the value DnIp outputted from the digital controller 23 a. “Dncorr”represents the signal outputted from the correction amount calculationunit 25 b. “Vref” represents the signal outputted from the referencevoltage DAC 26 b. In addition, “cksh” represents a clock signal inputtedto the S/H circuit 22 a, and “Vsh” is a signal outputted from the S/Hcircuit 22 a.

In FIG. 9, the slope compensator 31 generates a ramp voltage. Theoperator 32 superimposes the ramp voltage and the voltage inputted viathe current detection terminal Cs. The superimposition result outputtedfrom the operator 32 is inputted to the positive input terminal of thecomparator 24 a.

The slope compensation simulation circuit 3 includes an oscillator 3 a,a counter 3 b, and a resistor 3 c. At a rising edge of the PWM signalVpwm0 (when the primary switching element M1 is brought in an on-state),the counter 3 b is reset and begins counting by using the output signalfrom the oscillator 3 a as a clock.

At a falling edge of the PWM signal Vpwm0 (when the primary switchingelement M1 is brought in an off-state), the counter 3 b stops counting.The resistor 3 c resets holding the counter output value at a fallingedge of the PWM signal Vpwm0 and holds the counter output value at arising edge of the PWM signal Vpwm0.

The operation clock period Tcnt of the counter 3 b is set (1/Tcnt) tocorrespond to the voltage change of the ramp voltage of the slopecompensator 31 over time (ΔV/Δ t).

As another means for setting a counter range so that the product of theclock period T_(cnt) of the counter 3 b and the maximum count numberN_(cnt) is larger than the maximum switching period Ts_(max), a gain maybe set to the counter output and the gain may be outputted.

At a falling edge of the PWM signal, the operator performs calculationprocessing on the output Dnslope[n:0] from the slope compensationsimulation circuit 3 and the output DnIp[n:0] from the digitalcontroller 23 a, generates a digital value Dnlpslope[n:0] thatcorresponds to the primary current value Ip on which slope compensationhas been performed, and inputs the digital value Dnlpslope[n:0] to theprimary current detection unit 25 a.

The subsequent operation is the same as that of the control device 20-1illustrated in FIG. 8. Namely, the correction amount calculation unit 25b calculates a correction amount, and the operator 26 a adds the digitalreference value Dnref0 and the voltage value that corresponds to thecorrection amount. The reference voltage DAC 26 b generates thereference voltage Vref corrected per switching period from the additionresult, and the ADC 22 b compares the reference voltage Vref with theoutput Vsh from the S/H circuit 22 a. In this way, desired PWM controlis performed.

Configured in this way, the control device 20-2 is able to perform slopecompensation without causing the current control DAC 23 b to have fasterresponse characteristics than those of a ramp signal generation clock.

In addition, even under operating conditions where a slope compensationoperation is needed, the secondary voltage drop is accurately corrected,and suitable load regulation characteristics are obtained.

Next, a control device of a switching power supply that is able tocontrol the start and stop of the slope compensation will be described.The switching power supply does not always need to execute the slopecompensation while in operation. The switching power supply does notneed to execute the slope compensation under certain input and outputconditions.

For example, when the load current and the duty ratio are small, sinceno subharmonic oscillation occurs, no slope compensation is needed.Thus, the control device 20-2 illustrated in FIG. 9 may be provided witha function of controlling the start and stop of the slope compensation.

FIGS. 11 and 12 illustrate an example of a configuration of a controldevice 20-3 of the switching power supply. The control device 20-3 ofthe switching power supply determines the start and stop of the slopecompensation circuit on the basis of the output signal DnIp from thedigital controller 23 a.

In addition to the elements in the circuit configuration illustrated inFIG. 9, the control device 20-3 includes a slope compensation comparator34 as an additional circuit element. In addition, each of a slopecompensator 31-1 and a slope compensation simulation circuit 3-1additionally include an input terminal for receiving an output signalEnslope from the slope compensation comparator 34. The other basicconfiguration is the same as that illustrated in FIG. 9.

The output signal DnIP from the digital controller 23 a is inputted tothe positive input terminal of the slope compensation comparator 34, anda determination value Dnslopeth for determining whether to start or stopthe slope compensation is inputted to the negative input terminal of theslope compensation comparator 34. The determination value Dnslopeth maybe set in advance as a unique value in the device or as a value set fromthe outside.

When the value of the signal DnIp is equal to or more than thedetermination value Dnslopeth, the slope compensation comparator 34outputs an H-level pulse signal Enslope (the start of the slopecompensation).

In contrast, when the value of the signal DnIp is less than thedetermination value Dnslopeth, the slope compensation comparator 34outputs an L-level pulse signal Enslope (the stop of the slopecompensation).

Each of the slope compensator 31-1 and the slope compensation simulationcircuit 3-1 includes an input terminal for receiving the pulse signalEnslope and stops its output on the basis of the pulse signal Enslope.Configured in this way, the control device 20-3 is able to flexiblycontrol the start and stop of the slope compensation on the basis ofinput and output conditions.

Next, overcurrent protection will be described. Many switching powersupplies include an overcurrent protection circuit for preventing damageto load or switching elements when an erroneous operation occurs.

The following description assumes an overcurrent protection circuit thatdetermines whether an overcurrent flows through the primary switchingelement M1 on the basis of the voltage inputted via the currentdetection terminal Cs and turns off the gate signal (PWM signal) if anovercurrent is detected.

In the case of a switching power supply having this overcurrentprotection circuit, if a control device is configured as illustrated bythe control device 20-1 in FIG. 8, the gate signal could be decreased toan L level by the overcurrent protection within a period shorter thanthe H level period of the gate signal determined by the output DnIp fromthe digital controller 23 a. If this is the case, since the output DnIpfrom the digital controller 23 a and the primary current Ip_(pk) flowingat the moment when the PWM signal is decreased to the L level do notmatch, the reference voltage is corrected to excessively increase theoutput voltage.

The following description will be made on a control device of aswitching power supply that performs accurate overcurrent protectionwhile solving the above problem associated with overcurrent protection.

FIG. 13 illustrates an example of a configuration of a control device ofthe switching power supply. The control device 20-4 of the switchingpower supply includes an overcurrent protection function.

In addition to the elements in the circuit configuration illustrated inFIG. 8, the control device 20-4 includes an overcurrent protection DAC41, an overcurrent detection comparator (an overcurrent detection unit)42, a flag generation unit 43, and a selector 44 as additional circuitelements. A driver Dr1 sets its output to “L” and stops switching whenthe value of an overcurrent signal Enocp outputted from the overcurrentdetection comparator 42 reaches “H” (overcurrent state).

The overcurrent protection DAC 41 converts a previously set digitalovercurrent reference value Dnocpth into an analog signal. Theovercurrent reference value Dnocpth may be preset as a unique value inthe device or a value set from the outside.

In addition, the signal Vcs inputted via the current detection terminalCs is inputted to the positive input terminal of the overcurrentdetection comparator 42, and an output signal from the overcurrentprotection DAC is inputted to the negative input terminal of theovercurrent detection comparator 42.

When the level of the input voltage Vcs is equal to or more than thelevel of the output signal from the overcurrent protection DAC 41, theovercurrent detection comparator 42 outputs an H-level overcurrentsignal Enocp (indicating an overcurrent).

When the level of the input voltage Vcs is less than the level of theoutput signal from the overcurrent protection DAC 41, the overcurrentdetection comparator 42 outputs an L-level overcurrent signal Enocp(indicating no overcurrent).

The flag generation unit 43 holds the level of the overcurrent detectionsignal Enocp outputted from the overcurrent detection comparator 42 fora certain period and outputs the level as an overcurrent flag.

The output signal DnIP of the digital controller 23 a is inputted to oneinput terminal of the selector 44 arranged upstream of the primarycurrent detection unit 25 a, and the digital overcurrent reference valueDnocpth is inputted to the other input terminal of the selector 44. Theovercurrent flag is inputted to the selection terminal of the selector44.

When the overcurrent flag is the H level, the selector 44 outputs thedigital value Dnocpth corresponding to an overcurrent limit value. Whenthe overcurrent flag is the L level, the selector 44 outputs the outputsignal DnIP of the digital controller 23 a. The output from the selector44 is inputted to the primary current detection unit 25 a. Thesubsequent operation is the same as described above.

With this circuit configuration, for example, the control device 20-4 isable to perform suitable overcurrent protection while preventing thephenomenon in which the output DnIp from the digital controller 23 a andthe primary current Ip_(pk) flowing at the moment when the PWM signal isdecreased to the L level do not match.

As described above, according to the present technique, the loss causedby the secondary current is estimated by using various control amountsin the voltage-feedback control circuit and the current that flowsthrough the primary switching element, and the loss is corrected. As aresult, the voltage drop on the secondary side is accurately corrected,and the load regulation characteristics of the switching power supplyare improved.

While embodiments have thus been described as examples, any one of theindividual elements in the embodiments may be replaced by a differentelement having equivalent functions. In addition, other elements orsteps may be added.

The error between a target voltage and an output voltage is accuratelycorrected, and the output voltage is stably supplied.

All examples and conditional language provided herein are intended forthe pedagogical purposes of aiding the reader in understanding theinvention and the concepts contributed by the inventor to further theart, and are not to be construed as limitations to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although one or more embodiments of thepresent invention have been described in detail, it should be understoodthat various changes, substitutions, and alterations could be madehereto without departing from the spirit and scope of the invention.

What is claimed is:
 1. An apparatus for controlling a switching powersupply that causes a transformer to convert an input voltage on aprimary side into a direct-current output voltage on a secondary sidebased on switching of a switching element and to supply the outputvoltage to load, the apparatus comprising: an output voltage errordetection unit configured to output an auxiliary winding voltagegenerated across an auxiliary winding having the same number of turns asa secondary winding of the transformer a certain period after asecondary conduction period of the transformer starts; a correctionamount calculation unit configured to calculate a secondary voltage dropcaused by a secondary current flowing in the secondary conduction periodbased on a primary current flowing through the switching elementarranged on the primary side when the secondary conduction period startsand output a result of the calculation as a correction amount to beadded to a target value for the output voltage; a reference voltagegeneration unit configured to generate a reference voltage by adding avoltage corresponding to the correction amount to a target voltage forthe output voltage; a control unit configured to perform feedbackcontrol to minimize an error between the auxiliary winding voltageobtained after a certain delay period and the reference voltage andgenerate a feedback signal; and a pulse width modulation (PWM)generation unit configured to control a PWM signal based on the feedbacksignal, adjust switching of the switching element, and perform a controloperation to maintain the output voltage at a constant level.
 2. Theapparatus for controlling a switching power supply according to claim 1,wherein the correction amount calculation unit calculates the correctionamount by using characteristics of a diode connected on the secondaryside, a resistance component of the diode and a secondary output voltagepath, characteristics of the transformer, and a delay period set by theoutput voltage error detection unit as constants.
 3. The apparatus forcontrolling a switching power supply according to claim 2, wherein thecorrection amount calculation unit calculates the correction amountVout_(corr) by using${Vout}_{corr} = {\left( {{{VF}\; 0} - {r \times \frac{Vout}{Ls} \times {Tsh}}} \right) + {r \times \frac{N\; 1}{N\; 2} \times {Ip}_{pk}}}$in which VF0 represents a voltage drop of the diode caused when thesecondary current is zero, the diode being connected to one end of thesecondary winding of the transformer, r represents the resistancecomponent of the diode and secondary output voltage path, Ls representsan inductance component of the secondary winding of the transformer, N1represents the number of turns of the primary winding of thetransformer, N2 represents the number of turns of the secondary windingof the transformer, Tsh represents the delay period set by the outputvoltage error detection unit, Vout represents the output voltage, andIP_(pk) represents the primary current.
 4. The apparatus for controllinga switching power supply according to claim 1, the apparatus furthercomprising: a slope compensator configured to add a slope compensationramp voltage to a voltage applied to a terminal for detecting theprimary current; and a slope compensation simulation circuit configuredto add a signal that corresponds to the ramp voltage to a signal valueindicating the primary current outputted from the control unit, inputthe obtained signal to the correction amount calculation unit, andreduce the error caused by the addition of the ramp voltage.
 5. Theapparatus for controlling a switching power supply according to claim 4,the apparatus further comprising: a comparator configured to compare thesignal value indicating the primary current outputted from the controlunit with a determination value for determining whether to perform slopecompensation and determine whether to perform slope compensation, basedon a result of the comparison.
 6. The apparatus for controlling aswitching power supply according to claim 1, the apparatus furthercomprising: an overcurrent detection unit configured to detect whetheran overcurrent is present in the primary current; a flag generation unitconfigured to generate a flag that indicates presence of theovercurrent; and a selector configured to select the primary current oran overcurrent limit value based on a value of the flag and to input theselected one of the primary current and the overcurrent limit value tothe correction amount calculation unit.
 7. A method for controlling aswitching power supply that causes a transformer to convert an inputvoltage on a primary side into a direct-current output voltage on asecondary side based on switching of a switching element and supply theoutput voltage to load, the method comprising: detecting and holding anauxiliary winding voltage generated across an auxiliary winding and asecondary winding of the transformer a certain period after a secondaryconduction period of the transformer starts; detecting a primary currentflowing through the switching element arranged on the primary side whenthe secondary conduction period starts; calculating a secondary voltagedrop caused by a secondary current flowing in the secondary conductionperiod based on the primary current and using a result of thecalculation as a correction amount to be added to a target value for theoutput voltage; generating a reference voltage by adding a voltagecorresponding to the correction amount to a target voltage for theoutput voltage; and performing a control operation to minimize an errorbetween the auxiliary winding voltage detected and held after a certaindelay period and the reference voltage, adjusting switching of theswitching element, and performing a control operation to maintain theoutput voltage at a constant level.
 8. The method of claim 7, whereincalculating the correction amount is performed based on a diodeconnected on the secondary side, a resistance component of the diode anda secondary output voltage path, characteristics of the transformer, anda delay period set by the output voltage error detection unit asconstants.
 9. The method of claim 8, wherein the correction amountVout_(corr) is calculated based on the following equation:${Vout}_{corr} = {\left( {{{VF}\; 0} - {r \times \frac{Vout}{Ls} \times {Tsh}}} \right) + {r \times \frac{N\; 1}{N\; 2} \times {Ip}_{pk}}}$in which VF0 represents a voltage drop of the diode caused when thesecondary current is zero, the diode being connected to one end of thesecondary winding of the transformer, r represents the resistancecomponent of the diode and secondary output voltage path, Ls representsan inductance component of the secondary winding of the transformer, N1represents the number of turns of the primary winding of thetransformer, N2 represents the number of turns of the secondary windingof the transformer, Tsh represents the delay period set by the outputvoltage error detection unit, Vout represents the output voltage, andIP_(pk) represents the primary current.
 10. The method of claim 7,further comprising: adding a slope compensation ramp voltage to avoltage applied to a terminal for detecting the primary current; addinga signal that corresponds to the ramp voltage to a signal valueindicating the primary current outputted from the control unit;inputting the obtained signal to the correction amount calculation unit;and reducing the error caused by the addition of the ramp voltage. 11.The method of claim 10, further comprising: comparing the signal valueindicating the primary current outputted from the control unit with adetermination value for determining whether to perform slopecompensation and determine whether to perform slope compensation, basedon a result of the comparison.
 12. The method of claim 7, furthercomprising: detecting whether an overcurrent is present in the primarycurrent; generating a flag that indicates presence of the overcurrent;selecting one of the primary current and an overcurrent limit valuebased on a value of the flag; and inputting the selected one of theprimary current and the overcurrent limit value to the correction amountcalculation unit.